package InterfacePractice;

public class Person implements Cloneable{
    String name;
    int age;
    Money money=new Money();

    public Person(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public Person() {
    }

    @Override
    protected Object clone() throws CloneNotSupportedException {
        Person tmp=(Person)super.clone();
        tmp.money=(Money)this.money.clone();
        return tmp;
    }


}
